<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php 
	$ci = & get_instance(); 
	$OFFLINE_PAYMENT = $ci->offline_payment_entity->init('id',$_POST['id']); 
?>

<form action="<?php echo site_url('admin/dataman/payment/edit_payment_submit');?>" name="edit_payment_submit" id="edit_payment_submit" method="post" enctype="multipart/form-data" >
	<input type="hidden" name="id" id="id" value="<?php echo $_POST['id'];?>" />
	<input type="hidden" name="payment_type" id="payment_type" value="<?php echo $OFFLINE_PAYMENT->getPaymentType();?>" />
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Coin:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="coin" name="coin" value="<?php echo $OFFLINE_PAYMENT->getCoin();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="coin_error">Required field.</span></div>
	<div class="clrboth"></div>
	
<?php if($OFFLINE_PAYMENT->getPaymentType() == 'bank_deposit'):?>	
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Bank name:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="bank_name" name="bank_name" value="<?php echo $OFFLINE_PAYMENT->getBankName();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="bank_name_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Bank branch:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="bank_branch" name="bank_branch" value="<?php echo $OFFLINE_PAYMENT->getBankBranch();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="bank_branch_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Deposited date:</span></div>
	<div class="grid6">
		<input type="text" id="deposited_date" name="deposited_date" class="std-input" value="<?php echo sysDateFormat($OFFLINE_PAYMENT->getDepositedDate());?>" />
	</div>
	<div class="grid2"><span class="bold red hidden" id="deposited_date_error">Required field.</span></div>
	<div class="clrboth"></div>	
	
<?php endif;?>	

<?php if($OFFLINE_PAYMENT->getPaymentType() == 'neft_transfer'):?>	

	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Remitter's A/C Name:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="remitter_ac_name" name="remitter_ac_name" value="<?php echo $OFFLINE_PAYMENT->getRemitterAcName();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="remitter_ac_name_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Remitter's A/C Number:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="remitter_ac_number" name="remitter_ac_number" value="<?php echo $OFFLINE_PAYMENT->getRemitterAcNumber();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="remitter_ac_number_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Remitter's Bank Name:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="remitter_bank_name" name="remitter_bank_name" value="<?php echo $OFFLINE_PAYMENT->getRemitterBankName();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="remitter_bank_name_error">Required field.</span></div>
	<div class="clrboth"></div>	
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Transfer Date:</span></div>
	<div class="grid6">
		<input type="text" class="std-input" id="transfer_date" name="transfer_date" value="<?php echo sysDateFormat($OFFLINE_PAYMENT->getTransferDate());?>" />
	</div>
	<div class="grid2"><span class="bold red hidden" id="transfer_date_error">Required field.</span></div>
	<div class="clrboth"></div>	
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Transfer Time:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="transfer_time" name="transfer_time" value="<?php echo $OFFLINE_PAYMENT->getTransferTime();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="transfer_time_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Transaction Id:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="transaction_id" name="transaction_id" value="<?php echo $OFFLINE_PAYMENT->getTransactionId();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="transaction_id_error">Required field.</span></div>
	<div class="clrboth"></div>
				
<?php endif;?>	

<?php if($OFFLINE_PAYMENT->getPaymentType() == 'dd'):?>	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*DD No.:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="dd_no" name="dd_no" value="<?php echo $OFFLINE_PAYMENT->getDdNo();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="dd_no_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Bank name:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="dd_bank_name" name="dd_bank_name" value="<?php echo $OFFLINE_PAYMENT->getDdBankName();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="dd_bank_name_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Remitter's address:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="remitter_address" name="remitter_address" value="<?php echo $OFFLINE_PAYMENT->getRemitterAddress();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="remitter_address_error">Required field.</span></div>
	<div class="clrboth"></div>	
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*DD Date:</span></div>
	<div class="grid6">
		<input type="text" class="std-input" id="dd_date" name="dd_date" value="<?php echo sysDateFormat($OFFLINE_PAYMENT->getDdDate());?>" />
	</div>	
	<div class="grid2"><span class="bold red hidden" id="dd_date_error">Required field.</span></div>
	<div class="clrboth"></div>
<?php endif;?>

<?php if($OFFLINE_PAYMENT->getPaymentType() == 'emoney_order'):?>	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*e-Money Order No.:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="emoney_order_no" name="emoney_order_no" value="<?php echo $OFFLINE_PAYMENT->getEmoneyOrderNo();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="emoney_order_no_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Remitter's address:</span></div>
	<div class="grid6"><input type="text" maxlength="45" id="emoney_remitter_address" name="emoney_remitter_address" value="<?php echo $OFFLINE_PAYMENT->getEmoneyRemitterAddress();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="emoney_remitter_address_error">Required field.</span></div>
	<div class="clrboth"></div>	
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*e-Money Order date:</span></div>
	<div class="grid6">
		<input type="text" class="std-input" id="emoney_order_date" name="emoney_order_date" value="<?php echo sysDateFormat($OFFLINE_PAYMENT->getEmoneyOrderDate());?>" />
	</div>
	<div class="grid2"><span class="bold red hidden" id="emoney_order_date_error">Required field.</span></div>
	<div class="clrboth"></div>
<?php endif;?>

<?php if($OFFLINE_PAYMENT->getAttachment()):?>	
	<a href="<?php echo $OFFLINE_PAYMENT->getAttachmentFileStorage();?>" target="_blank" >Attachment</a>
<?php endif;?>
	
	<div class="grid2">&nbsp;</div>
	<div class="grid6"><input type="submit" class="button" /> <?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
